/**
 ****************************************************************************************
 *
 * @file cfg.h
 *
 * @brief App Configure MACRO, --preinclude
 *
 ****************************************************************************************
 */

#ifndef _APP_CFG_H_
#define _APP_CFG_H_

/// System Clock(0=16MHz, 1=32MHz, 2=48MHz, 3=64MHz)
#define SYS_CLK                (0)
#define BLE_LITELIB            (1)

/// Debug Mode(0=Disable, 1=via UART, 2=via RTT)
#define DBG_MODE               (1)
#define DBG_UART_BAUD          (BRR_921600)

#define BLE_ADDR               {0x19, 0x06, 0x23, 0xA1, 0x01, 0xD2}
#define BLE_DEV_NAME           "B6x-TIKTOK-"
#define BLE_DEV_ICON           0x03C1  // 03C0-Generic HID,03C1-Keyboard,03C2-Mouse,03C4-Gamepad
#define BLE_PHY                (GAP_PHY_LE_1MBPS)
#define BLE_AUTH               (GAP_AUTH_REQ_NO_MITM_BOND)
#define BT_MAC_STORE_OFFSET    (0x1200)
#define OS_STORE_OFFSET        (0x1300)

#define SLV_INTV_MIN           (10)
#define SLV_LATENCY            (0)
#define SLV_TIME_OUT           (300)
#define GAP_ATT_CFG            (0x40) //(GAP_ATT_SLV_PREF_PAR_BIT)

/// Profile Configure
#define PRF_DISS               (1)
#define PRF_BASS               (1)
#define PRF_HIDS               (1)
#define GATT_CLI               (1)
#define BAS_PWR_STA            (0)

/// Debug Configure
#if (DBG_MODE)
    #define DBG_APP            (0)
    #define DBG_PROC           (0)
    #define DBG_ACTV           (0)
    #define DBG_GAPM           (0)
    #define DBG_GAPC           (1)
    #define DBG_GATT           (0)
    #define DBG_KEYS           (1)
    #define DBG_HIDS           (0)
    #define DBG_BASS           (0)
#endif

/// Misc Options
#define CFG_SFT_TMR            (1)
#define CFG_SLEEP              (1)
#define CFG_POWEROFF           (0)
#define RC32K_CALIB_PERIOD     (10000)
#define NOKEY_PRESS_UPDATE_PARAM (10000) // 10s(unit in 1ms)
#define KEY_SCAN_PERIOD        (20)
#endif  //_APP_CFG_H_
